package entitiesIds;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * LanguagedepartmentId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class LanguagedepartmentId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1852428687639950043L;
	private Integer idDepartament;
	private String abb;

	// Constructors

	/** default constructor */
	public LanguagedepartmentId() {
	}

	/** full constructor */
	public LanguagedepartmentId(Integer idDepartament, String abb) {
		this.idDepartament = idDepartament;
		this.abb = abb;
	}

	// Property accessors

	@Column(name = "idDepartament", nullable = false)
	public Integer getIdDepartament() {
		return this.idDepartament;
	}

	public void setIdDepartament(Integer idDepartament) {
		this.idDepartament = idDepartament;
	}

	@Column(name = "abb", nullable = false, length = 5)
	public String getAbb() {
		return this.abb;
	}

	public void setAbb(String abb) {
		this.abb = abb;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LanguagedepartmentId))
			return false;
		LanguagedepartmentId castOther = (LanguagedepartmentId) other;

		return ((this.getIdDepartament() == castOther.getIdDepartament()) || (this
				.getIdDepartament() != null
				&& castOther.getIdDepartament() != null && this
				.getIdDepartament().equals(castOther.getIdDepartament())))
				&& ((this.getAbb() == castOther.getAbb()) || (this.getAbb() != null
						&& castOther.getAbb() != null && this.getAbb().equals(
						castOther.getAbb())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getIdDepartament() == null ? 0 : this.getIdDepartament()
						.hashCode());
		result = 37 * result
				+ (getAbb() == null ? 0 : this.getAbb().hashCode());
		return result;
	}

	@Override
	public String toString() {
		return "LanguagedepartmentId [idDepartament=" + idDepartament
				+ ", abb=" + abb + "]";
	}

	
}